# def my_range(num):
#     a = 0
#     while a < num:
#         yield a
#         a += 1
#
#
# print(my_range(4))
#
#
# def fn(num):
#     a, b, c = 0, 1, 0
#     while c < num:
#         yield a
#         a, b = b, a + b
#         c += 1
#
#
# for i in fn(5):
#     print(i)
#
#
# def fb_list(num):
#     l = [0, 1]
#     for i in range(num -2):
#         l.append(l[-2] + l[-1])
#     return l
#
# data = fb_list(6)
# print(data)



s = 'k1:1|k2:2|k3:3'    # {'k1': '1', 'k2': '2', 'k3': '3'}
d = {}
for i in s.split('|'):
    k, v = i.split(':')
    d[k] = v

print(d)


